
local jizhi = fk.CreateSkill{
  name = "mini_ex__jizhi",
}

Fk:loadTranslationTable{
  ["mini_ex__jizhi"] = "集智",
  [":mini_ex__jizhi"] = "当你使用锦囊牌时，你可以摸一张牌，本回合你以此法获得的牌不计入手牌上限。",

  ["@mini_ex__jizhi-inhand-turn"] = "集智",

  ["$mini_ex__jizhi1"] = "取其善者，兼以巧思。",
  ["$mini_ex__jizhi2"] = "仁寿之意，在乎于智。",
}

jizhi:addEffect(fk.CardUsing, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jizhi.name) and data.card.type == Card.TypeTrick
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, jizhi.name, nil, "@mini_ex__jizhi-inhand-turn")
  end,
})

jizhi:addEffect("maxcards", {
  exclude_from = function (self, player, card)
    return card:getMark("@mini_ex__jizhi-inhand-turn") > 0
  end,
})

return jizhi
